package com.liuweiheng.base.exception;

import cn.hutool.core.lang.Assert;

/**
 * 自定义异常：用户已存在
 */
public class UserException extends RuntimeException {

    /**
     * 用户id
     */
    private Integer id;
    /**
     * 异常信息
     */
    private String message;

    public UserException(Integer id, String message) {
        super(message);
        this.message = message;
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
